function g_showLoading() {
    var idx = layer.msg('处理中...',{icon:16,shade:[0.5,'#f5f5f5'],scrollbar:false,offset:'0px',
    time:100000})
    return idx;
}

var g_password_salt = "1a2b3c4d"

// 获取url参数
function g_getQueryString(name) {
    var reg = new RegExp("(^|&)"+name+"=([^$]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r != null) return unescape(r[2]);
    return null;
}
// 时间格式化
Date.prototype.format=function (format) {
    var args = {
        "M+":this.getMonth()+1,
        "d+":this.getDate(),
        "H+":this.getHours(),
        "m+":this.getMonth(),
        "s+":this.getSeconds()
    };
    if(/(y+)/.test(format))
        format = format.replace(RegExp.$1,(this.getFullYear+"").substr(4-RegExp.$1.length));
    for (var i in args) {
        var n = args[i];
        if (new RegExp("(" + i + ")").test(format))
            format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? n : ("00" + n).substr(("" + n).length));
    }
    return format;
}



